import { Online } from "@/api/interface/index";
import { ResPage } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";
import qs from "qs";
/**
 * @name 线上餐厅模块
 */

// 轮播图列表
export const getAdvertList = (params: Online.ResAdvertList) => {
  return http.post<ResPage<Online.ResAdvertList>>(PORT1 + `/CoreCmsAdvert/GetPageList`, qs.stringify(params));
};

// 编辑轮播图
export const editAdvert = (params: {}) => {
  return http.post(PORT1 + `/CoreCmsAdvert/doEdit`, params);
};

// 删除轮播图
export const deleteAdvert = (params: {}) => {
  return http.post(PORT1 + `/CoreCmsAdvert/doDelete`, params);
};

// 删除轮播图
export const createAdvert = (params: {}) => {
  return http.post(PORT1 + `/CoreCmsAdvert/DoCreate`, params);
};
